#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int MAXN = 5e5+10;

int d[MAXN],n,alpha,dd[MAXN];
ll s[MAXN];

int check(int x){
	memcpy(d,dd,(n+2)<<2); d[n+1] = x;
	sort(d+1,d+n+2,greater<int>());
	for(int i = 1;i <= n+1;i++) s[i] = s[i-1] + d[i];
	int cur = n+2;
	for(int i = 1;i <= n+1;i++){
		while(d[cur-1] <= i && cur > i) cur--;
		while(cur <= i) cur++;
		if(1ll * max(0,cur-i-1) * i + (ll) i * (i-1) + max(0ll,s[n+1] - s[cur-1]) < s[i]) {if(d[i] > x) return 0;else return 2;}
	}
	//	cout<<"W"<<x<<endl;
	return 1;
}

int main (){
	scanf("%d",&n);
	for(int i = 1;i <= n;i++) scanf("%d",&dd[i]),alpha = (alpha + dd[i]) & 1;
	int l = 0,r = n/2+1,L = n,R = 0;
	while(l <= r){
		int mid = l+r>>1,res = check(mid * 2 + alpha);
		if(res == 1) L = min(L,mid*2+alpha),r = mid-1;
		else if(res == 0) l = mid+1;
		else if(res == 2) r = mid-1;
	}
	l = 0,r = n/2;
	while(l <= r){
		int mid = l+r>>1,res = check(mid * 2 + alpha);
		if(res == 1) R = max(R,mid*2+alpha),l = mid+1;
		else if(res == 0) l = mid+1;
		else if(res == 2) r = mid-1;
	}
	if(L > R) printf("-1");
	else for(int i = L;i <= R;i+=2) printf("%d ",i);
	puts("");
	return 0;
}
